*******************************************************************************
* REPLICATION DATA FOR: I'M COMING OUT! HOW VOTER DISCRIMINIATION PRODUCES    *
* EFFECTIVE LGBTQ LAWMAKERS													  *
* Replication Code for PS													  *	
* Jacob M. Lollis, UVA / Mackenzie R. Dobson, UVA & University of Notre Dame  *
* 														  					  *																	      
*******************************************************************************

*\ Load .dta file included in replication materials. 

*Install eststo package if not already installed. 
ssc install estout

*NOTE: We use the esttab command within the eststo package referenced above to export model estimates into LaTeX-compatible tables. These .tex files were then uploaded in our OverLeaf LaTeX manuscript. Individuals can export these model estimates using compatible formats (documented in the estout package), such as .tex files, HTML outputs, and MS word items. 

*NOTE: Use "Lollis&Dobson.2024.dta" unless specified otherwise. 





*(Appendix) Table 4.1: LGBTQ Legislators Are More Effective Lawmakers (Figure 1 corresponds with Model 6)


eststo m1: reg c.BILL_wshare i.LGBTQ pcLGBTQ i.female i.race partyid_num seniority i.comm_chair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres i.term_limits_applied c.squire_index vote_share chambernum statenum i.term_num, cluster(sles_id)

eststo m2:reg c.AIC_wshare i.LGBTQ pcLGBTQ i.female i.race partyid_num seniority i.comm_chair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres vote_share i.term_limits_applied c.squire_index chambernum statenum i.term_num, cluster(sles_id)

eststo m3:reg c.ABC_wshare i.LGBTQ pcLGBTQ i.female i.race partyid_num seniority i.comm_chair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres vote_share i.term_limits_applied c.squire_index chambernum statenum i.term_num, cluster(sles_id)

eststo m4: reg c.PASS_wshare i.LGBTQ pcLGBTQ i.female i.race partyid_num seniority i.comm_chair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres i.term_limits_applied c.squire_index vote_share chambernum statenum i.term_num, cluster(sles_id)

eststo m5:reg c.LAW_wshare i.LGBTQ pcLGBTQ  i.female i.race partyid_num seniority i.comm_chair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres i.term_limits_applied c.squire_index vote_share chambernum statenum i.term_num, cluster(sles_id)

eststo m6:reg SLES_z i.LGBTQ pcLGBTQ i.female i.race partyid_num seniority i.comm_chair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres i.term_limits_applied c.squire_index vote_share chambernum statenum i.term_num, cluster(sles_id)

eststo m7:reg SLES_z i.LGBTQ pcLGBTQ i.female i.race partyid_num seniority i.comm_chair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres i.term_limits_applied c.squire_index vote_share chambernum i.statenum i.term_num i.district_num, cluster(sles_id)

esttab m6 using "shiny_lgbtq_sles_coefs.csv" , se wide nogap plain nonotes replace ///


* Table to export for LaTeX

esttab m1 m2 m3 m4 m5 m6 m7 using "shiny_stages&lgbtq_sles.tex" , se compress label replace ///
nonumbers mtitles("BILL" "AIC" "ABC" "PASS" "LAW" "SLES" "SLES" ) b(3) se(3) star(+ 0.1 * 0.05 ** 0.01 *** 0.001)



















*(Appendix) Table 4.2: Out Legislators Are More Effective Lawmakers (Figure 2 corresponds with model 6)
eststo clear 

eststo m1: reg c.BILL_wshare i.Outduringelection pcOut i.female i.race partyid_num seniority i.comm_chair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres i.term_limits_applied c.squire_index vote_share chambernum statenum i.term_num, cluster(sles_id)

eststo m2:reg c.AIC_wshare i.Outduringelection pcOut i.female i.race partyid_num seniority i.comm_chair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres vote_share i.term_limits_applied c.squire_index chambernum statenum i.term_num, cluster(sles_id)

eststo m3:reg c.ABC_wshare i.Outduringelection pcOut i.female i.race partyid_num seniority i.comm_chair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres vote_share i.term_limits_applied c.squire_index chambernum statenum i.term_num, cluster(sles_id)

eststo m4: reg c.PASS_wshare i.Outduringelection pcOut i.female i.race partyid_num seniority i.comm_chair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres i.term_limits_applied c.squire_index vote_share chambernum statenum i.term_num, cluster(sles_id)

eststo m5:reg c.LAW_wshare i.Outduringelection pcOut  i.female i.race partyid_num seniority i.comm_chair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres i.term_limits_applied c.squire_index vote_share chambernum statenum i.term_num, cluster(sles_id)

eststo m6:reg SLES_z i.Outduringelection pcOut i.female i.race partyid_num seniority i.comm_chair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres i.term_limits_applied c.squire_index vote_share chambernum statenum i.term_num, cluster(sles_id)

eststo m7: reg SLES_z Outduringelection i.sles_id, cluster(sles_id)

* Coefs to export for coef plot 

esttab m6 using "shiny_out_sles_.csv" , se wide nogap plain nonotes replace 


* Table to export for LaTeX

esttab m1 m2 m3 m4 m5 m6 m7 using "shiny_stages&out_sles.tex" , se compress label replace ///
nonumbers mtitles("BILL" "AIC" "ABC" "PASS" "LAW" "SLES" "SLES" ) b(3) se(3) star(+ 0.1 * 0.05 ** 0.01 *** 0.001)



















* (In-text) Table 1: Obergefell, Time Period, and Replacement Tests 
eststo clear

* Pre-/post-Obergefell

*Original code to create variable
*gen pre_ob_lgbtq = .
*	replace pre_ob_lgbtq = 1 if term == "1987_1988" & LGBTQ==1
*	replace pre_ob_lgbtq = 1 if term == "1989_1990" & LGBTQ==1
*	replace pre_ob_lgbtq = 1 if term == "1993_1994" & LGBTQ==1
*	replace pre_ob_lgbtq = 1 if term == "1995_1996" & LGBTQ==1
*	replace pre_ob_lgbtq = 1 if term == "1995_1998" & LGBTQ==1
*	replace pre_ob_lgbtq = 1 if term == "1997_1998" & LGBTQ==1
*	replace pre_ob_lgbtq = 1 if term == "1997_1998" & LGBTQ==1
*	replace pre_ob_lgbtq = 1 if term == "1999_2000" & LGBTQ==1
*	replace pre_ob_lgbtq = 1 if term == "2000_2001" & LGBTQ==1
*	replace pre_ob_lgbtq = 1 if term == "2000_2003" & LGBTQ==1
*	replace pre_ob_lgbtq = 1 if term == "2001_2002" & LGBTQ==1
*	replace pre_ob_lgbtq = 1 if term == "2002_2003" & LGBTQ==1
*	replace pre_ob_lgbtq = 1 if term == "2003_2006" & LGBTQ==1
*	replace pre_ob_lgbtq = 1 if term == "2003_2004" & LGBTQ==1
*	replace pre_ob_lgbtq = 1 if term == "2004_2005" & LGBTQ==1
*	replace pre_ob_lgbtq = 1 if term == "2004_2007" & LGBTQ==1
*	replace pre_ob_lgbtq = 1 if term == "2005_2006" & LGBTQ==1
*	replace pre_ob_lgbtq = 1 if term == "2006_2007" & LGBTQ==1
*	replace pre_ob_lgbtq = 1 if term == "2007_2008" & LGBTQ==1
*	replace pre_ob_lgbtq = 1 if term == "2008_2009" & LGBTQ==1
*	replace pre_ob_lgbtq = 1 if term == "2008_2011" & LGBTQ==1
*	replace pre_ob_lgbtq = 1 if term == "2009_2010" & LGBTQ==1
*	replace pre_ob_lgbtq = 1 if term == "2009_2010" & LGBTQ==1
*	replace pre_ob_lgbtq = 1 if term == "2010_2011" & LGBTQ==1
*	replace pre_ob_lgbtq = 1 if term == "2011_2012" & LGBTQ==1
*	replace pre_ob_lgbtq = 1 if term == "2011_2014" & LGBTQ==1
*	replace pre_ob_lgbtq = 1 if term == "2012_2013" & LGBTQ==1
*	replace pre_ob_lgbtq = 1 if term == "2013_2014" & LGBTQ==1
*	replace pre_ob_lgbtq = 1 if term == "2014_2015" & LGBTQ==1
*	replace pre_ob_lgbtq = 0 if pre_ob_lgbtq !=1  & LGBTQ==1
	

	
eststo m1: reg SLES_z i.pre_ob_lgbtq pcLGBTQ i.female i.race partyid_num seniority i.comm_chair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres i.term_limits_applied c.squire_index vote_share chambernum statenum i.term_num, cluster(sles_id)




* Periods (1990-2000, 2000-2010, 2010-2018)

*Original code to create variables
*gen pool_term_1 = 0 
*	replace pool_term_1 = 1 if term == "1987_1988"
*	replace pool_term_1 = 1 if term == "1989_1990"
*	replace pool_term_1 = 1 if term == "1991_1992"
*	replace pool_term_1 = 1 if term == "1993_1994"
*	replace pool_term_1 = 1 if term == "1995_1996"
*	replace pool_term_1 = 1 if term == "1995_1998"
*	replace pool_term_1 = 1 if term == "1997_1998"
*	replace pool_term_1 = 1 if term == "1997_1998"
*	replace pool_term_1 = 1 if term == "1999_2000"
	
	
	
*gen pool_term_2 = 0 

*	replace pool_term_2 = 1 if term == "2000_2001"
*	replace pool_term_2 = 1 if term == "2000_2003"
*	replace pool_term_2 = 1 if term == "2001_2002"
*	replace pool_term_2 = 1 if term == "2002_2003"
*	replace pool_term_2 = 1 if term == "2003_2006"
*	replace pool_term_2 = 1 if term == "2003_2004"
*	replace pool_term_2 = 1 if term == "2004_2005"
*	replace pool_term_2 = 1 if term == "2004_2007"
*	replace pool_term_2 = 1 if term == "2005_2006"
*	replace pool_term_2 = 1 if term == "2006_2007"
*	replace pool_term_2 = 1 if term == "2007_2008"
*	replace pool_term_2 = 1 if term == "2008_2009"
*	replace pool_term_2 = 1 if term == "2008_2011"
*	replace pool_term_2 = 1 if term == "2009_2010"
*	replace pool_term_2 = 1 if term == "2009_2010"

	
*gen pool_term_3 = 0 

*	replace pool_term_3 = 1 if term == "2010_2011"
*	replace pool_term_3 = 1 if term == "2011_2012"
*	replace pool_term_3 = 1 if term == "2011_2014"
*	replace pool_term_3 = 1 if term == "2012_2013"
*	replace pool_term_3 = 1 if term == "2013_2014"
*	replace pool_term_3 = 1 if term == "2014_2015"
*	replace pool_term_3 = 1 if term == "2015_2016"
*	replace pool_term_3 = 1 if term == "2016_2017"
*	replace pool_term_3 = 1 if term == "2015_2018"
*	replace pool_term_3 = 1 if term == "2016_2019"
*	replace pool_term_3 = 1 if term == "2017_2018"


eststo m2: reg SLES_z i.LGBTQ pcLGBTQ i.female i.race partyid_num seniority i.comm_chair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres i.term_limits_applied c.squire_index vote_share chambernum statenum if pool_term_1 == 1, cluster(sles_id)


eststo m3: reg SLES_z i.LGBTQ pcLGBTQ i.female i.race partyid_num seniority i.comm_chair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres i.term_limits_applied c.squire_index vote_share chambernum statenum if pool_term_2 == 1, cluster(sles_id)


eststo m4: reg SLES_z i.LGBTQ pcLGBTQ i.female i.race partyid_num seniority i.comm_chair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres i.term_limits_applied c.squire_index vote_share chambernum statenum if pool_term_3 == 1, cluster(sles_id)


* LGBTQ after LGBTQ
*Code used to create original variable
*sort state chamber district term

* Use the egen command to create a variable that counts the number of observations for each combination of state, chamber, district, and term where "LGBTQ" is 1
*egen count_LGBTQ = total(Outduringelection), by(state chamber district term)

* Use the egen command to create an indicator variable for the first occurrence of each combination of state, chamber, district, and term where "LGBTQ" is 1
*egen first = tag(state chamber district term) if count_LGBTQ > 0 & Outduringelection == 1

* Create the new variable "not_first_LGBTQ" and set it to 1 if the lawmaker is not the first LGBTQ lawmaker in their state, chamber, district, and term
*gen not_first_LGBTQ = 0
*replace not_first_LGBTQ = 1 if first == 0 & Outduringelection == 1


eststo m5: reg SLES_z i.not_first_LGBTQ pcOut i.female i.race partyid_num seniority i.comm_chair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres i.term_limits_applied c.squire_index vote_share chambernum statenum i.term_num if Outduringelection == 1, cluster(sles_id)

* Table to export for LaTeX

esttab m1 m2 m3 m4 m5 using "shiny_time_tests_take2.tex" , se compress label replace ///
nonumbers mtitles("Pre-Obergefell" "1980s-90s" "2000s" "2010-2018" "Not First LGBTQ Seatholder") b(3) se(3) star(+ 0.1 * 0.05 ** 0.01 *** 0.001)














*(Appendix) Table 4.3: LGBTQ Legislators in Red States Are More Effective Lawmakers 
 
	 
gen redstate = 0
replace redstate = 1 if pres_demvotes_majpercent < 40

gen bluestate = 0 
replace bluestate = 1 if pres_demvotes_majpercent > 60



eststo clear

eststo m1: reg SLES_z LGBTQ pcLGBTQ i.female i.race partyid_num seniority i.comm_chair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres vote_share i.term_limits_applied c.squire_index chambernum i.statenum i.term_num if redstate==1, cluster(sles_id)

eststo m2: reg SLES_z LGBTQ pcLGBTQ i.female i.race partyid_num seniority i.comm_chair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres vote_share i.term_limits_applied c.squire_index chambernum i.statenum i.term_num if bluestate==1, cluster(sles_id)

eststo m3: reg SLES_z LGBTQ pcLGBTQ i.female i.race partyid_num seniority i.comm_chair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres vote_share i.term_limits_applied c.squire_index chambernum i.statenum i.term_num i.district_num if redstate==1, cluster(sles_id)

eststo m4: reg SLES_z LGBTQ pcLGBTQ i.female i.race partyid_num seniority i.comm_chair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres vote_share i.term_limits_applied c.squire_index chambernum i.statenum i.term_num i.district_num if bluestate==1, cluster(sles_id)

* Code to export table (if we decide to drop the coef plot) 
esttab m1 m3 m2 m4 using "redstate_bluestate_test.tex" , se compress label replace ///
	 nonumbers mtitles("Red State" "Red State" "Blue State" "Blue State" ) b(3) se(3) star(+ 0.1 * 0.05 ** 0.01 *** 0.001)
	 
* Coefs to export for coef plot 

*esttab m1 m2 using "shiny_redstate_bluestate_coefs.csv" , se wide nogap plain nonotes replace 














*(Appendix) Table 6.1: Out Republican Legislators Are More Effective Lawmakers

eststo m1: reg SLES_z i.Outduringelection pcOut i.female i.race seniority i.comm_chair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres vote_share i.term_limits_applied c.squire_index chambernum statenum i.term_num if republican==1, cluster(sles_id)

eststo m2: reg SLES_z i.Outduringelection pcOut i.female i.race seniority i.comm_chair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres vote_share i.term_limits_applied c.squire_index chambernum statenum i.term_num if republican==0, cluster(sles_id)

eststo m3: reg SLES_z i.Outduringelection i.republican i.Outduringelection##i.republican pcOut i.female i.race seniority i.comm_chair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres vote_share i.term_limits_applied c.squire_index chambernum statenum i.term_num, cluster(sles_id)













*(Appendix) Table 7.1: LGBTQ Candidates Raise More Money in Campaigns

	***NOTE: OPEN "Lollis&Dobson_2024_DIME.dta"

*clear all
*use "/Users/mackenziedobson/Dropbox/LGBTQ Legislative Effectiveness/Data/PS data/gayper_shiny_dime.dta"

destring totalreceipts, replace force
gen totalreceipts_log = log(totalreceipts)

eststo clear 

eststo m1: reg percent_of_total_contrib i.LGBTQ pcLGBTQ i.female i.race partyid_num seniority i.comm_chair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres i.term_limits_applied c.squire_index vote_share icostatus_num i.chambernum i.statenum i.term_num i.district_num, cluster(sles_id)

eststo m2: reg percent_of_total_indiv_contrib i.LGBTQ pcLGBTQ i.female i.race partyid_num seniority i.comm_chair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres i.term_limits_applied c.squire_index vote_share icostatus_num i.chambernum i.statenum i.term_num i.district_num, cluster(sles_id)

eststo m3: reg percent_of_total_pac_contrib i.LGBTQ pcLGBTQ i.female i.race partyid_num seniority i.comm_chair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres i.term_limits_applied c.squire_index vote_share icostatus_num i.chambernum i.statenum i.term_num i.district_num, cluster(sles_id)

eststo m4: reg totalreceipts_log i.LGBTQ pcLGBTQ i.female i.race partyid_num seniority i.comm_chair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres i.term_limits_applied c.squire_index vote_share icostatus_num i.chambernum i.statenum i.term_num i.district_num, cluster(sles_id)


* Export Appendix Table 6.2.3

esttab m1 m2 m3 m4 using "campaign_selection_test.tex" , se compress label replace ///
	 nonumbers mtitles("\% of Total Race Contributions " "\% of Total Race Contributions from Individuals" "\% of Total Race Contributions from PACs" "Sum of Total Race Contribtions" ) b(3) se(3) star(+ 0.1 * 0.05 ** 0.01 *** 0.001)




	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 


*(Appendix) Table 7.2: LGBTQ Legislators Are More Likely to be Committee Chairs 

	***NOTE: OPEN "Lollis&Dobson_2024_BillType.dta"

eststo clear 

eststo m1: logit legislator_committeechair i.LGBTQ pcLGBTQ i.female i.race partyid_num seniority i.in_majority i.gov_same_party c.ideo_med_distance i.Leader_speakerpres i.term_limits_applied c.squire_index vote_share chambernum i.statenum i.term_num, cluster(sles_id)

esttab m1 using "committeechair_selection_test.tex" , se compress label replace ///
	 nonumbers mtitles("Full Sample (Committee Chair)" ) b(3) se(3) star(+ 0.1 * 0.05 ** 0.01 *** 0.001)


	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 

*(Appendix) Table 7.3: LGBTQ Legislators Are More Productive Lawmakers 

	***NOTE: OPEN "Lollis&Dobson_2024_BillType.dta"


eststo clear 

eststo m1: reg num_sponsored_bills i.LGBTQ pcLGBTQ i.female i.race partyid_num seniority i.legislator_committeechair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres i.term_limits_applied c.squire_index vote_share chambernum i.statenum i.term_num

eststo m2: reg ss_bills i.LGBTQ pcLGBTQ i.female i.race partyid_num seniority i.legislator_committeechair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres i.term_limits_applied c.squire_index vote_share chambernum i.statenum i.term_num

eststo m3: reg s_bills i.LGBTQ pcLGBTQ i.female i.race partyid_num seniority i.legislator_committeechair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres i.term_limits_applied c.squire_index vote_share chambernum i.statenum i.term_num

eststo m4: reg c_bills i.LGBTQ pcLGBTQ i.female i.race partyid_num seniority i.legislator_committeechair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres i.term_limits_applied c.squire_index vote_share chambernum i.statenum i.term_num

* Export Appendix Table 6.2.2

esttab m1 m2 m3 m4 using "productivity_selection_test.tex" , se compress label replace ///
	 nonumbers mtitles("All Bills" "Substantive & Significant Bills" "Substantive Bills" "Commerative Bills" ) b(3) se(3) star(+ 0.1 * 0.05 ** 0.01 *** 0.001)



	 
	 

	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
	 
*(Appendix) Table 8.1: LGBTQ Legislators' Effectiveness Does Not Predict Vote Share in the Following Election	 
	 
	 	***NOTE: OPEN "Lollis&Dobson_2024.dta"

	 eststo clear 

sort sles_id term_num
by sles_id (term_num): gen vote_share_lead = vote_share[_n+1]

	 
eststo m1: reg vote_share_lead SLES_z i.LGBTQ pcLGBTQ i.female i.race partyid_num seniority i.comm_chair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres i.term_limits_applied c.squire_index i.chambernum i.statenum i.term_num, cluster(sles_id)

eststo m2: reg vote_share_lead SLES_z i.LGBTQ pcLGBTQ i.female i.race partyid_num seniority i.comm_chair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres i.term_limits_applied c.squire_index i.chambernum i.statenum i.term_num i.district_num, cluster(sles_id)

eststo m3: reg vote_share_lead SLES_z pcLGBTQ i.female i.race partyid_num seniority i.comm_chair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres i.term_limits_applied c.squire_index i.chambernum i.statenum i.term_num if LGBTQ==0, cluster(sles_id)

eststo m4: reg vote_share_lead SLES_z pcLGBTQ i.female i.race partyid_num seniority i.comm_chair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres i.term_limits_applied c.squire_index i.chambernum i.statenum i.term_num if LGBTQ==1, cluster(sles_id)

	 
* Export Appendix Table 6.3.1

esttab m1 m2 m3 m4 using "rr_survival_test_8.2.tex" , se compress label replace ///
	 nonumbers mtitles("Full Sample" "Full Sample" "Non-LGBTQ Lawmakers" "LGBTQ Lawmakers") b(3) se(3) star(+ 0.1 * 0.05 ** 0.01 *** 0.001)
 
	 
	 
	
	
	
	
	
	
	
	
	
	
	
	
*(Appendix) Table 9.2: Transformation of the Dependent Variable: LGBTQ Legislators Are More Effective Lawmakers 

	 	***NOTE: OPEN "Lollis&Dobson_2024.dta"

		
eststo clear

eststo m1: reg c.BILL_wshare i.LGBTQ pcLGBTQ i.female i.race partyid_num seniority i.comm_chair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres i.term_limits_applied c.squire_index vote_share chambernum statenum i.term_num, cluster(sles_id)

eststo m2:reg c.AIC_wshare i.LGBTQ pcLGBTQ i.female i.race partyid_num seniority i.comm_chair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres vote_share i.term_limits_applied c.squire_index chambernum statenum i.term_num, cluster(sles_id)

eststo m3:reg c.ABC_wshare i.LGBTQ pcLGBTQ i.female i.race partyid_num seniority i.comm_chair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres vote_share i.term_limits_applied c.squire_index chambernum statenum i.term_num, cluster(sles_id)

eststo m4: reg c.PASS_wshare i.LGBTQ pcLGBTQ i.female i.race partyid_num seniority i.comm_chair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres i.term_limits_applied c.squire_index vote_share chambernum statenum i.term_num, cluster(sles_id)

eststo m5:reg c.LAW_wshare i.LGBTQ pcLGBTQ  i.female i.race partyid_num seniority i.comm_chair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres i.term_limits_applied c.squire_index vote_share chambernum statenum i.term_num, cluster(sles_id)

eststo m6:reg SLES i.LGBTQ pcLGBTQ i.female i.race partyid_num seniority i.comm_chair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres i.term_limits_applied c.squire_index vote_share chambernum statenum i.term_num, cluster(sles_id)
* Export Appendix Table 5.2 

esttab m1 m2 m3 m4 m5 m6 using "pub_lgbtq_sensitivity_7.2.tex" , se compress label replace ///
	 nonumbers mtitles("BILL" "AIC" "ABC" "PASS" "LAW" "SLES" ) b(3) se(3) star(+ 0.1 * 0.05 ** 0.01 *** 0.001)
	 

	 
	 
	 
	 
	 
	 
	 
	 
	 
*(Appendix) Table 9.3: Transformation of the Dependent Variable: Out Legislators Are More Effective Lawmakers


eststo clear

eststo m1: reg c.BILL_wshare i.Outduringelection pcOut i.female i.race partyid_num seniority i.comm_chair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres i.term_limits_applied c.squire_index vote_share chambernum statenum i.term_num, cluster(sles_id)

eststo m2:reg c.AIC_wshare i.Outduringelection pcOut i.female i.race partyid_num seniority i.comm_chair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres vote_share i.term_limits_applied c.squire_index chambernum statenum i.term_num, cluster(sles_id)

eststo m3:reg c.ABC_wshare i.Outduringelection pcOut i.female i.race partyid_num seniority i.comm_chair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres vote_share i.term_limits_applied c.squire_index chambernum statenum i.term_num, cluster(sles_id)

eststo m4: reg c.PASS_wshare i.Outduringelection pcOut i.female i.race partyid_num seniority i.comm_chair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres i.term_limits_applied c.squire_index vote_share chambernum statenum i.term_num, cluster(sles_id)

eststo m5:reg c.LAW_wshare i.Outduringelection pcOut  i.female i.race partyid_num seniority i.comm_chair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres i.term_limits_applied c.squire_index vote_share chambernum statenum i.term_num, cluster(sles_id)

eststo m6:reg SLES i.Outduringelection pcOut i.female i.race partyid_num seniority i.comm_chair i.in_majority i.gov_same_party i.majority_leadership i.minority_leadership c.ideo_med_distance i.Leader_speakerpres i.term_limits_applied c.squire_index vote_share chambernum statenum i.term_num, cluster(sles_id)

* Export Appendix Table 5.2

esttab m1 m2 m3 m4 m5 m6 using "pub_lgbtq_sensitivity_7.3.tex" , se compress label replace ///
	 nonumbers mtitles("BILL" "AIC" "ABC" "PASS" "LAW" "SLES" ) b(3) se(3) star(+ 0.1 * 0.05 ** 0.01 *** 0.001)
	 
	 

	
	
	
	
	
	
	
	


